package com.content.scaffold.common.web;

/**
 * @author luowenliang
 */

public enum ResponseCodeEnum implements ResponseCode {

    /**
     * 请求成功
     */
    SUCCESS(0, "请求成功"),
    ERROR(-1, "系统繁忙，请稍后重试"),
    DATA_ERROR(1, "数据变更异常，请重试"),

    USER_DUPLICATE(2, "用户名重复！"),

    LOGIN_ERROR(101, "用户名或密码错误！"),

    UNAUTHORIZED(102, "未登录或者登录超时，请重新登录"),

    PARAM_ERROR(201, "参数错误");


    public final Integer code;
    public final String message;

    ResponseCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
